package com.samson.elasticsearch.dao;

/**
 * @author samson
 * @version 1.0
 * @date 2019/7/3 15:01
 */

import com.samson.elasticsearch.entity.ItemEntity;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description:定义ItemRepository 接口
 * @Param:
 * 	ItemEntity:为实体类
 * 	Long:为Item实体类中主键的数据类型
 * @Author: https://blog.csdn.net/chen_2890
 * @Date: 2018/9/29 0:50
 */
@Repository
public interface ItemRepository extends ElasticsearchRepository<ItemEntity,Long> {

    /**
     * @Description:根据价格区间查询
     * @Param price1
     * @Param price2
     * @Author: https://blog.csdn.net/chen_2890
     */
    List<ItemEntity> findByPriceBetween(double price1, double price2);

}

